#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
    if (argc != 2) {
        cout << "Usage: " << argv[0] << " num" << endl;
        return 0;
    }

    int num = atoi(argv[1]);
    if (num < 0) {
        cout << "Invalid input num: " << num << endl;
        return 1;
    }

    int res = calcNum(num);

    cout << "The " << num << "th num is: " << res << endl;

    return 0;
}

